﻿<%@ Page  Language="C#" MasterPageFile="AdminSite.master" AutoEventWireup="true"
    CodeFile="DMDiaDiemDuLich.aspx.cs" Inherits="DMDiaDiemDuLich" ValidateRequest="false" %>

<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 106px;
        }
        .style2
        {
        }
        .style3
        {
            width: 97px;
        }
        .style4
        {
            height: 21px;
        }
        .style5
        {
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 align="center" style="font-weight: bold">
        DANH MỤC ĐỊA ĐIỂM DU LỊCH</h2>
         <asp:ValidationSummary ID="VanPhongValidationSummary" runat="server" CssClass="failureNotification" 
                 ValidationGroup="VanPhongValidationGroup"/>
    <table style="width: 100%">
        <tr>
            <td class="style1">
                Tên địa điểm</td>
            <td class="style5">
                <asp:TextBox ID="txtTenVanPhong" runat="server" Height="23px" Width="91%"></asp:TextBox>
                <asp:RequiredFieldValidator ID="txtTenVanPhongRequired" runat="server" ControlToValidate="txtTenVanPhong" 
                             CssClass="failureNotification" ErrorMessage="Bạn chưa nhập tên địa điểm." ToolTip="Vui lòng nhập tên địa điểm." 
                             ValidationGroup="VanPhongValidationGroup">*</asp:RequiredFieldValidator>
                           
            </td>
            <td class="style3">
                Địa chỉ</td>
            <td>
                <asp:TextBox ID="txtDiaChi" runat="server" Width="90%" Height="23px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td >
                Số điện thoại</td>
            <td >
                <asp:TextBox ID="txtSoDienThoai" runat="server"  Width="90%" Height="23px"></asp:TextBox>
              </td>
            <td>
                Tỉnh thành</td>
            <td>
                <asp:DropDownList ID="ddlTinhThanh" runat="server" Height="22px" Width="91%">
                </asp:DropDownList>
               <asp:RequiredFieldValidator InitialValue="-1" ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlTinhThanh" 
                             CssClass="failureNotification" ErrorMessage="Bạn chưa chọn Tỉnh/Thành." ToolTip="Vui lòng chọn TỉnhTthành." 
                             ValidationGroup="VanPhongValidationGroup">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1" valign="top">
                Mô tả</td>
            <td class="style2" colspan="3">
                <CKEditor:CKEditorControl ID="txtMoTa" runat="server" Height="89px" 
                    Width="791px"></CKEditor:CKEditorControl>
            </td>
        </tr>
        <tr>
            <td class="style1" valign="top">
                Bản đồ</td>
            <td class="style2" colspan="3">
                <asp:TextBox ID="txtURL" runat="server" Width="96%" Height="73px" 
                    TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style4" align="center" colspan="4" valign="top">
                <asp:Button CssClass="btnadmin" ID="btnSave" runat="server" Text="Lưu" Width="117px" 
                    onclick="btnSave_Click"  ValidationGroup="VanPhongValidationGroup"  />  
                <asp:Button CssClass="btnadmin" ID="btnClearNew" runat="server" Text="Thêm mới" 
                    onclick="btnClearNew_Click" Width="123px" />
                <asp:HiddenField ID="keyField" runat="server" />
            </td>
        </tr>
    </table>
    <p>
        <asp:GridView ID="gridViewData"  CssClass="grid-view"    runat="server" CellPadding="3" Width="921px" 
            AutoGenerateColumns="False" GridLines="Vertical" 
            onrowcommand="gridViewData_RowCommand" 
            onrowdatabound="gridViewData_RowDataBound" ShowHeaderWhenEmpty="True">
            
            <Columns>
                <asp:ButtonField Text="Sửa" CommandName="cmdEdit"  >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:ButtonField Text="Xóa" CommandName="cmdDelete" >
                <ControlStyle Font-Underline="True" />
                </asp:ButtonField>
                <asp:BoundField HeaderText="STT" DataField="STT" >
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="Tên địa điểm" DataField="TEN_DIA_DIEM" />
                <asp:BoundField HeaderText="Địa chỉ" DataField="DIA_CHI" />
                <asp:BoundField HeaderText="Điện thoại" DataField="SO_DIEN_THOAI" />
                <asp:BoundField HeaderText="Tỉnh/Thành" DataField="TEN_TINH_THANH" />
            </Columns>
            <FooterStyle CssClass="gridfooter"/>
            <HeaderStyle CssClass="gridheader" />
            <PagerStyle CssClass="gridpager"/>
            <RowStyle CssClass="gridrownormal" />       
            <AlternatingRowStyle CssClass="gridrowalternate" />
            <SelectedRowStyle CssClass="gridselected"  />
            <SortedAscendingCellStyle  CssClass="gridrowsortasc" />
            <SortedAscendingHeaderStyle CssClass="gridheadersortasc" />
            <SortedDescendingCellStyle CssClass="gridrowsortdesc"/>
            <SortedDescendingHeaderStyle CssClass="gridheadersortdesc" />
        </asp:GridView>
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
